<?php /* Smarty version Smarty-3.1.18, created on 2017-02-20 17:02:22
         compiled from "Finance/views/user/exper_list.html" */ ?>
<?php /*%%SmartyHeaderCode:63589845058aab09edaf285-23142171%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '945cdeff951cde8313b84483ca4b4dbd349b211f' => 
    array (
      0 => 'Finance/views/user/exper_list.html',
      1 => 1487574483,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '63589845058aab09edaf285-23142171',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'total_awards' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_58aab09ede22d5_71332985',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_58aab09ede22d5_71332985')) {function content_58aab09ede22d5_71332985($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("public/header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 
<script src="/static/public/jquery.pagination.js" type="text/javascript" charset="utf-8"></script>
		<!--main部分-->
		<div class="x-main-upper w1180-con">
			<!--main--左边--logo/tab-->
			<?php echo $_smarty_tpl->getSubTemplate ("public/user_nav.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 
				<!--main--右边--banner-->
				<div class="main-right">
					<div class="mright-content">
						<!--头像、昵称、等级-->
						<?php echo $_smarty_tpl->getSubTemplate ("public/user_top.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 			
						<div class="clear"></div>
						<!--试玩信息-->
						<div class="cash66 mt15">
							<!--title-->
							<div class="title">
								<div class="vertical"></div>
                                                                <p class="title66">试玩信息</p>
                                                                <span class="fr">共获取溜溜币价值：<label style="font-size: 14px;" class="orange">￥<?php echo $_smarty_tpl->tpl_vars['total_awards']->value;?>
</label></span>
								<!--日期选择-->
							</div>
							<div class="clear"></div>
							<!--试玩信息content-->
							<div class="cash-code mt15">
                                                            <table class="taste">
                                                                <tr>
                                                                    <th>体验平台</th>
                                                                    <th>绑定信息</th>
                                                                    <th>绑定时间</th>
                                                                    <th>已获溜溜币</th>
                                                                    <!--<th>已获积分</th>-->
                                                                    <th>是否体验</th>
                                                                    <th>平台状态</th>
                                                                    <th>领取状态</th>
                                                                </tr>
                                                                <tbody id="exper_content"></tbody>
                                                            </table>
                                                            <!-- 页码navigation holder -->
                                                            <div class="holder" id="exper_pagination"></div>	
                                                            <script type="text/javascript">
                                                                    $(function(){
                                                                        showExperPlatsPage(0);
                                                                    });
                                                                    function handlePlatPage(resp){
                                                                        var str = "";
                                                                        var totalCount = resp.data.totalCount;
                                                                        var list = resp.data.list;
                                                                        $.each(list,function(index,data){
                                                                            var type="",temp="",flag="";
                                                                            if(data.is_online == 1){
                                                                                type = "<td class='green'>推广中</td>";
                                                                            }else{
                                                                                type = "<td class='orange'>已暂停</td>";
                                                                            }
                                                                            if(data.award_ids != ""){
                                                                                temp += "<td><button class='com-btn-valid' onclick='doReceiveAward(this);' data-award='"+data.award_ids+"' data-key='"+resp.sid+"' data-en='"+data.plat_en+"'>点击领取</button></td>";
                                                                            }else{
                                                                                temp += "<td><a href='"+data.url+"' target='_blank' style='color: #34aefa;'>继续体验</a></td>";
                                                                            }
                                                                            if(data.is_flag == 1){
                                                                                flag += "<td>已体验</td>";
                                                                            }else{
                                                                                flag += "<td>未体验</td>";
                                                                            }
                                                                            //<td class='green'>"+data.exper+"</td>
                                                                            str += "<tr><td><a href='"+data.url+"' target='_blank' style='color: #34aefa;font-size: 14px;'>"+data.title+"</a></td><td>"+data.usernamep+"</td><td>"+data.reg_time+"</td><td class='green'>"+data.award+"</td>"+flag+type+temp+"</tr>";
                                                                        });
                                                                        $("#exper_content").html(str);
                                                                        experPlatPage(totalCount,resp.data.pageIndex);
                                                                    }
                                                                    function showExperPlatsPage(pageIndex,jq){
                                                                        var params = {};
                                                                        params.pageIndex = pageIndex;
                                                                        doPageRequest("/user/my_exper_list.html",params,false,handlePlatPage,errorCallback);
                                                                    }
                                                                    
                                                                    function experPlatPage(total,pageIndex){
                                                                        $("#exper_pagination").pagination(total, { //recordCount在后台定义的一个公有变量，通过从数据库查询记录进行赋值，返回记录的总数
                                                                        callback: showExperPlatsPage,  //点击分页时，调用的回调函数
                                                                        prev_text: '<',  //显示上一页按钮的文本
                                                                        next_text: '>',  //显示下一页按钮的文本
                                                                        link_to:"javascript:void(0);",
                                                                        items_per_page:10,  //每页显示的项数
                                                                        num_display_entries:6,  //分页插件中间显示的按钮数目
                                                                        current_page:pageIndex,  //当前页索引
                                                                        num_edge_entries:2  //分页插件左右两边显示的按钮数目
                                                                        });
                                                                    }
                                                                    function doReceiveAward(o){
                                                                        var _self=$(o),p={},i=$(o).attr("data-award"),k=$(o).attr("data-key"),e=$(o).attr("data-en");
                                                                        if(typeof(k) == "undefined"){return;}
                                                                        cancelBtn(o);
                                                                        p.keyCode=k,p.award_ids=i,p.plat_id=e;
                                                                        doRequest("/user/do_receive.html",p,false,function(data){$(_self).parent().html("<a href='"+data.url+"' target='_blank' style='color: #34aefa;'>继续体验</a>");layer.msg(data.errorMsg,{time:3000,icon:1,offset:300});},function(data){comfirmBtn();alert(data.errorMsg);});
                                                                    }
                                                                </script>
							</div>
						</div>	
					</div>
				</div>
			</div>
		</div>
		<div class="clear"></div>
		<!--footer-->
<?php echo $_smarty_tpl->getSubTemplate ("public/footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 	<?php }} ?>
